function [v1, v] = valfunc_E(v2, z, L, param,glob,options)
% inputs

    s = [z, z];
    
    sa           = [L, s(:,2)];
    
    cv           = param.beta*(1 - param.gamma)*v2(sa); 
    
    F            = 0;-param.w*L;
    
    v1           = F + cv;
    
    v.v1 = v1;
    v.p_exit       = 0;
    v.l            = L;
    
    
%    if (sum(exp_f) > 0)
%        error('expected cost greater than 0');
%    end
    
    % For simplicity, try a fixed cost of exit
    %p_exit       = cv < param.c_fixed;
    %v1           = F + (1-p_exit).*(cv - param.c_fixed);
    
end